package com.dailyblue.java.design.工厂模式.简单工厂模式;

public class PhoneFactory {

    public static Phone manufacture(int type) {
        if (type == 1) {
            return new MetaPhone();
        } else if (type == 2) {
            return new IPhone();
        } else if (type == 3) {
            return new MiPhone();
        } else {
            return null;
        }
    }
}
